{if $smarty.get.act eq "addspecial"}
	{include file="BgcmsWebshop/Special/create.tpl"}
{else}
<div class="wrap">

{if $specials_message == null}
	<div id="ajaxResponse1" class="ajaxResponse"></div>
{else}
	<div id="ajaxResponse1" class="ajaxResponse fade" style="display:block">{$specials_message}</div>
{/if}
<h2>{TranslateTag}B_LABEL_SPECIAL_PRODUCT{/TranslateTag}</h2>
	<p>
		<a href="?module={$smarty.get.module}&sub1={$smarty.get.sub1}&act=addspecial"><img src="../view/admin/images/object_create.png" alt="Create" /></a>
	</p>
	<table class="widefat">
		<thead>
		<tr>
			<th scope="col" width="5%" style="text-align: center">{TranslateTag}B_LABEL_ID{/TranslateTag}</th>
			<th scope="col">{TranslateTag}B_LABEL_THUMBNAIL{/TranslateTag}</th>
	        <th class="point {if $smarty.get.by eq 'desc'}sortover{else}sortoverup{/if}"  scope="col" onclick="javascript:document.location='?module=BgcmsWebshop{if $smarty.get.sub1}&sub1={$smarty.get.sub1}{/if}&sort=product_name&by={if $smarty.get.by eq 'desc'}asc {else}desc{/if}'">{TranslateTag}B_LABEL_PRODUCT_NAME{/TranslateTag}</th>
            <th class="point {if $smarty.get.by eq 'desc'}sortover{else}sortoverup{/if}"  scope="col" onclick="javascript:document.location='?module=BgcmsWebshop{if $smarty.get.sub1}&sub1={$smarty.get.sub1}{/if}&sort=product_group_name&by={if $smarty.get.by eq 'desc'}asc {else}desc{/if}'">{TranslateTag}B_LABEL_PRODUCT_GROUP{/TranslateTag}</th>
	        <th scope="col" width="25%" style="text-align: right">{TranslateTag}B_LABEL_PRICE{/TranslateTag}</th>
            <th scope="col" style="text-align: center">Anordnung</th>
	        <th scope="col" width="5%">{TranslateTag}B_LABEL_DISPLAY{/TranslateTag}</th>
	        <th colspan="2" width="30%" style="text-align: center">{TranslateTag}B_LABEL_ACTION{/TranslateTag}</th>
		</tr>
		</thead>
		<tbody id="specialtable">
			{foreach name=special from=$SPECIALS item=item}
				<tr id="{$item->special_id}" class="{cycle values=,alternate}">
					<th scope='row' width="5%" style='text-align: center'>{$item->special_id}</th>
					<td><img src="../upload/product/thumb/{$item->product_thumbnail}" /></td>
					<td width="25%">{$item->product_name}</td>
                    <td width="25%">{$item->product_group_name}</td>
					<td width="25%" align="right"><s>{$item->product_price} {$item->symbol_left}</s>&nbsp;{$item->specials_new_products_price} {$item->symbol_left}</td>
                    <td align='center'>
                    		<a href="?{$smarty.server.QUERY_STRING}&amp;act=position&id={$item->special_id}"><img src="../view/admin/images/object_change.png" alt="Change" /></a>
                    </td>
					<td width="5%" align="center">
                    	{if $item->status eq 1}
                    		<img src="../view/admin/images/button_ok.png" alt="OK" />
                        {else}
                         	<img src="../view/admin/images/button_cancel.png" alt="cancel" />
                         {/if}      
                    </td>
					<td style="text-align: center"><a href="?module=BgcmsWebshop&sub1=specials&act=editspecial&id={$item->special_id}" 
							class='edit'><img src="../view/admin/images/object_edit.png" alt="Edit" /></a></td>
					<td style="text-align: center">
                    	<a onclick="onDeleteSpecial('?module={$smarty.get.module}&sub1=specials', '{$item->special_id}','product_id','{$item->product_name}','{$item->product_price}','{$item->product_id}','{$item->symbol_left}','{$item->position}')" 
							class='delete'><img src="../view/admin/images/object_delete.png" alt="Delete" /></a></td>
				</tr>
			{/foreach}
		</tbody>
	</table>
	<p>
		<a href="?module={$smarty.get.module}&sub1={$smarty.get.sub1}&act=addspecial"><img src="../view/admin/images/object_create.png" alt="Create" /></a>
	</p>
	
</div>
{/if}